import requests
from bs4 import BeautifulSoup as bf

# url = 'https://www.baidu.com/'
url = 'https://bj.lianjia.com/zufang/'
# url = 'https://movie.douban.com/chart'
headers = {
    'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36'
}

res = requests.get(url=url,headers=headers)
print(res.text)
# soup = bf(res.text,'lxml')
# //*[@id="content"]/div/div[1]/ol/li[1]/div/div[2]/div[1]/a